package org.lq.dlz.util;

import javax.sql.DataSource;

import org.apache.commons.dbcp2.BasicDataSourceFactory;
import org.apache.commons.dbutils.QueryRunner;



	public class JDBCUtils {
		protected QueryRunner queryRunner = null;

		public JDBCUtils() {
			queryRunner = new QueryRunner(ds);
		}

		private static DataSource ds;
		static {

			try {
				ds = BasicDataSourceFactory.createDataSource(PropsUtil.loadProps("dbcp.properties"));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		
		public static DataSource getDataSource() {
			return ds;
		}

	
	}